# -*- coding: utf-8 -*-            
# @Time : 2025/2/12 15:50
# @FileName: 01.py
# @Target:
import pandas as pd
import json, codecs, time, os
from pprint import pprint

df = pd.read_excel('CuZu标签体系.xlsx')

DICT = {}

for row_index , row in df.iterrows():
    label_1 = row['二级指标']
    label_2 = row['三级指标']
    if label_1 not in DICT.keys():
        DICT[label_1] = []
    DICT[label_1].append(label_2)

with codecs.open(filename='../cuzu_labels_20250212.json',
                 mode='w', encoding='utf-8') as fw:
    json.dump(obj=DICT, fp=fw, ensure_ascii=False, indent=4)






